﻿//
// © Algobox Ltd - Benn Eichhorn
//
using System;
using System.Collections.Generic;

namespace Algobox.Feeds.Finance.Trading
{
    public static class TradingFeedManager
    {
        #region Constructors

        static TradingFeedManager()
        {
            Feeds = new List<ITradingFeedAdaptor>();
        }

        #endregion
        //////////
        #region Member Variables



        #endregion
        //////////
        #region Properties

        private static List<ITradingFeedAdaptor> Feeds { get; set; }

        #endregion
        //////////
        #region Functions


        public static void AddFeed(ITradingFeedAdaptor feed)
        {
            if (Feeds.Contains(feed))
                throw new ArgumentException("This feed already is managed. Why are you trying to add it again?");
            else
                Feeds.Add(feed);
        }

        public static void RemoveFeed(ITradingFeedAdaptor feed)
        {
            if (Feeds.Contains(feed))
                Feeds.Remove(feed);
            else
                throw new ArgumentException("This feed already is not managed.");
        }        

        #endregion

    }
}
